{
  Copyright 2012, Jameel Halabi

  This unit is part of the BlaiseWave wrapper,
  which is licensed under the BSD 2-Clause license (see licenses/license.txt).
}

unit BW_Timer;

{$mode objfpc}{$H+}

interface

uses
  BW_Global ,
  LW_Timer  ;

type

  { TTimerInfo }

  TTimerInfo = class(TGlobal)
  protected
    function GetGlobalType                   : String; override;
  public
    procedure TimerAdd
              (        TimerEvProc : TTimerEventProc ;
	               Data        : Pointer         ;
		       Interval    : UInt64          ) ;
    procedure TimerRemove
              (        TimerEvProc : TTimerEventProc ;
	               Interval    : UInt64          ) ;
  end;

implementation

{ TTimerInfo }

function TTimerInfo.GetGlobalType: String;
begin
  Result := LWTIMER_GLOBAL ;
end;

procedure TTimerInfo.TimerAdd
                     (       TimerEvProc : TTimerEventProc ;
                             Data        : Pointer         ;
                             Interval    : UInt64          ) ;
begin
  PLWTimer(FGlobal)^.TimerAdd(TimerEvProc, Data, Interval);
end;

procedure TTimerInfo.TimerRemove
                     (       TimerEvProc : TTimerEventProc ;
                             Interval    : UInt64          ) ;
begin
  PLWTimer(FGlobal)^.TimerRemove(TimerEvProc, Interval);
end;

end.

